<?php
include_once("php/datafeed.php");
if(isset($_POST['username'])){
	$username = $_POST['username'];
	$password = $_POST['password'];
	$ret = register($username, $password);
}
?>
<!DOCTYPE HTML>
<html>
	<head></head>
	<body style="margin: 100px auto; width: 300px ">
		
		<form id="form" name="form" method="post" enctype="application/x-www-form-urlencoded" action="?">
			<table>
				<tr>
					<td>
						Username: 
					</td>
					<td>
						<input type="text" name="username"/>
					</td>
				</tr>
				
				<tr>
					<td>
						Passowrd: 
					</td>
					<td>
						<input type="password" name="password" id="password"/>
					</td>
				</tr>
				<tr>
					<td>
						 
					</td>
					<td>
						<input type="submit" value="register" id="submit"/>
					</td>
				</tr>
			</table>
			<input type="hidden" value="reg" name="act"/>
		</form>	
		<a href="index.php">Login</a>
		
		<?php 
		if(isset($ret)){
			echo $ret;
		} 
		?>
	</body>
</html>
